import request from '@/utils/request'

// 查询停留点信息列表
export function listStaypoint(query) {
  return request({
    url: '/eim/staypoint/list',
    method: 'get',
    params: query
  })
}

// 查询停留点信息详细
export function getStaypoint(id) {
  return request({
    url: '/eim/staypoint/' + id,
    method: 'get'
  })
}

// 根据personId查询停留点信息详细
export function getStaypointByPersonId(pid) {
  return request({
    url: '/eim/staypoint/person/' + pid,
    method: 'get'
  })
}

// 新增停留点信息
export function addStaypoint(data) {
  return request({
    url: '/eim/staypoint',
    method: 'post',
    data: data
  })
}

// 修改停留点信息
export function updateStaypoint(data) {
  return request({
    url: '/eim/staypoint',
    method: 'put',
    data: data
  })
}

// 删除停留点信息
export function delStaypoint(id) {
  return request({
    url: '/eim/staypoint/' + id,
    method: 'delete'
  })
}
